<style type="text/css">/*<![CDATA[*/
#BaiduMap{padding: 10px 10px; border: 0px solid #999;min-height: 500px;height: 100px;}

@media print{
  #notes{display:none}
  #BaiduMap{margin:0}
}
/*]]>*/
</style>
<include file="Public:pagerForm" />

<div class="pageHeader">
	<div id="currentPoint">点击地图获取经纬度坐标</div>
</div>

<div class="pageContent" >
	
	<div id="searchBox"></div>
	<div id="BaiduMap" style="overflow: hidden; position: relative; z-index: 0; background-color: rgb(243, 241, 236); color: rgb(0, 0, 0); text-align: left;"></div>
<script type="text/javascript">/*<![CDATA[*/
// 创建地图对象并初始化
var map = new BMap.Map("BaiduMap");
var point = new BMap.Point(116.404, 39.915);
map.centerAndZoom(point, 14);
map.enableInertialDragging(); //启用地图惯性拖拽，默认禁用。
map.enableScrollWheelZoom(); //启用滚轮放大缩小，默认禁用。


map.addEventListener("click",function(e){
    //alert(e.point.lng + "," + e.point.lat);
                    map.clearOverlays();
                var marker = new BMap.Marker(e.point);  // 创建标注
                map.addOverlay(marker); 
                var currentPoint = $('#currentPoint');
                currentPoint.text( e.point.lng + ', ' + e.point.lat );
                console.log(currentPoint.text());
                currentPoint.select();
});
/*]]>*/</script>
</div>